---
title: Manage prompts
sidebarTitle: Manage prompts
---

LangSmith provides several tools to help you manage your [_prompts_](/langsmith/prompt-engineering-concepts) effectively. This page describes the following features:

- [Commit tags](#commit-tags) for version control and environment management.
- [Webhook triggers](#trigger-a-webhook-on-prompt-commit) for automating workflows when prompts are updated.
- [Public prompt hub](#public-prompt-hub) for discovering and using community-created prompts.

## Commit tags

[_Commit tags_](/langsmith/prompt-engineering-concepts#tags) are labels that reference a specific [_commit_](/langsmith/prompt-engineering-concepts#commits) in your prompt's version history. They help you mark significant versions and control which versions run in different environments. By referencing tags rather than commit IDs in your code, you can update which version is being used without modifying the code itself.

Each tag references exactly one commit, though you can reassign a tag to point to a different commit.

Use cases for commit tags can include:

- **Environment-specific tags**: Mark commits for `production` or `staging` environments, which allows you to switch between different versions without changing your code.
- **Version control**: Mark stable versions of your prompts, for example, `v1`, `v2`, which lets you reference specific versions in your code and track changes over time.
- **Collaboration**: Mark versions ready for review, which enables you to share specific versions with collaborators and get feedback.

### Create a tag

To create a tag, navigate to the **Commits** tab for a prompt. Click on the tag icon next to the commit you want to tag. Click **New Tag** and enter a name for the tag.

![](/langsmith/images/commits-tab.png) ![](/langsmith/images/create-new-prompt-tag.png)

### Move a tag

To point a tag to a different commit, click on the tag icon next to the destination commit, and select the tag you want to move. This will automatically update the tag to point to the new commit.

![](/langsmith/images/move-prompt-tag.png)

### Delete a tag

To delete a tag, click on the delete icon next to the tag you want to delete. This will delete the tag altogether and it will no longer be associated with any commit.

### Use tags in code

Tags provide a stable way to reference specific versions of your prompts in code. Instead of using commit hashes directly, you can reference tags that can be updated without changing your code.

Here is an example of pulling a prompt by tag in Python:

```python
prompt = client.pull_prompt("joke-generator:prod")
# If prod tag points to commit a1b2c3d4, this is equivalent to:
prompt = client.pull_prompt("joke-generator:a1b2c3d4")
```

For more information on how to use prompts in code, refer to [Managing prompts programmatically](/langsmith/manage-prompts-programmatically).

## Trigger a webhook on prompt commit

You can configure a webhook to be triggered whenever a commit is made to a prompt.

Some common use cases of this include:

* Triggering a CI/CD pipeline when prompts are updated.
* Synchronizing prompts with a GitHub repository.
* Notifying team members about prompt modifications.

### Configure a webhook

Navigate to the **Prompts** section in the left-hand sidebar or from the application homepage. In the top right corner, click on the `+ Webhook` button.

Add a webhook URL and any required headers.

<Note>
You can only configure one webhook per workspace. If you want to configure multiple per workspace or set up a different webhook for each prompt, let us know in the [LangChain Forum](https://forum.langchain.com/).
</Note>

To test out your webhook, click the **Send test notification** button. This will send a test notification to the webhook URL you provided with a sample payload.

The sample payload is a JSON object with the following fields:

- `prompt_id`: The ID of the prompt that was committed.
- `prompt_name`: The name of the prompt that was committed.
- `commit_hash`: The commit hash of the prompt.
- `created_at`: The date of the commit.
- `created_by`: The author of the commit.
- `manifest`: The manifest of the prompt.

### Trigger the webhook

Commit to a prompt to trigger the webhook you've configured.

#### Use the Playground

If you do this in the Playground, you'll be prompted to deselect the webhooks you'd like to avoid triggering.

![](/langsmith/images/commit-prompt-playground.png)

#### Using the API

If you commit via the API, you can specify to skip triggering the webhook by setting the `skip_webhooks` parameter to `true` or to an array of webhook ids to ignore. Refer to the [API docs](https://api.smith.langchain.com/redoc#tag/commits/operation/create_commit_api_v1_commits__owner___repo__post) for more information.

## Public prompt hub

LangSmith's public prompt hub is a collection of prompts that have been created by the LangChain community that you can use for reference.

<Note>
Note that prompts are user-generated and unverified. LangChain does not review or endorse public prompts, use these at your own risk. Use of Prompt Hub is subject to our [Terms of Service](https://www.langchain.com/terms-of-service).
</Note>

Navigate to the **Prompts** section of the left-hand sidebar and click on **Browse all Public Prompts in the LangChain Hub**.

Here you'll find all of the publicly listed prompts in the LangChain Hub. You can search for prompts by name, handle, use cases, descriptions, or models. You can fork prompts to your personal organization, view the prompt's details, and run the prompt in the Playground. You can [pull any public prompt into your code](/langsmith/manage-prompts-programmatically) using the SDK.

To view prompts tied to your workspace, visit the **Prompts** tab in the sidebar.

![](/langsmith/images/prompts-tab.png)

